package com.hutao.manage.pojo;

import java.util.Date;

import org.springframework.format.annotation.DateTimeFormat;

import com.fasterxml.jackson.annotation.JsonFormat;

public class TreatmentTrace {

	// 初始化信息
	public static String VISIT_INIT = "CSH";

	// 病案归档
	public static final String VISIT_PIGEONHOLE = "BAGD";

	// 病案质控
	public static final String VISIT_QUALITY = "BAZK";

	// 病案编页
	public static final String VISIT_PAGINATION = "BABY";

	// 病案编目
	public static String VISIT_PAGE = "BABM";

	// 病案扫描
	public static String VISIT_SCAN = "BASM";

	private Integer id;

	private String treatmentGuid;

	private String userId;

	@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date traceDate = new Date();

	private Integer traceTypeId;

	private String traceInfo;
	
	public static TreatmentTrace getTreatmentTrace(String visitGuid, String currentUser) {
		TreatmentTrace treatmentTrace = new TreatmentTrace();
		treatmentTrace.setTraceDate(new Date());
		treatmentTrace.setTreatmentGuid(visitGuid);
		treatmentTrace.setUserId(currentUser);
		return treatmentTrace;
	}
	

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getTreatmentGuid() {
		return treatmentGuid;
	}

	public void setTreatmentGuid(String treatmentGuid) {
		this.treatmentGuid = treatmentGuid == null ? null : treatmentGuid.trim();
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId == null ? null : userId.trim();
	}

	public Date getTraceDate() {
		return traceDate;
	}

	public void setTraceDate(Date traceDate) {
		this.traceDate = traceDate;
	}

	public Integer getTraceTypeId() {
		return traceTypeId;
	}

	public void setTraceTypeId(Integer traceTypeId) {
		this.traceTypeId = traceTypeId;
	}

	public String getTraceInfo() {
		return traceInfo;
	}

	public void setTraceInfo(String traceInfo) {
		this.traceInfo = traceInfo == null ? null : traceInfo.trim();
	}
}